#include <bits/stdc++.h>
using namespace std;
int a[1005], sum[1005];

int main() {
  int n, x;
  cin >> n >> x;

  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);

  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + a[i];
  }

  if (x == sum[n]) {
    cout << "No";
    return 0;
  }

  for (int i = 1; i <= n - 1; i++) {
    if (x == sum[i])
      swap(a[i], a[i + 1]);
  }

  cout << "Yes" << endl;
  for (int i = 1; i <= n; i++) {
    cout << a[i] << " ";
  }

  return 0;
}